package haizhi.fruitmall.exception;

import haizhi.fruitmall.enumeration.ResultEnum;
import lombok.Getter;

/**
 * @Date: 2017/10/8 13:12
 * @Author: Richard Zane
 * @Detail:
 */

@Getter
public class ResultException extends RuntimeException{

    private Integer code;

    public ResultException(ResultEnum resultEnum){
        super(resultEnum.getHint());
        this.code = resultEnum.getCode();
    }

    public ResultException(String hint){
        super(hint);
    }

    public ResultException(Integer code,String hint) {
        super(hint);
        this.code = code;
    }

}
